<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/common/tag.jsp"%>
<html>
  <head>
    <title></title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">

<%@ include file="/common/common_css.jsp"%>
<%@ include file="/common/common_js.jsp"%>
<script type="text/javascript">

//定义列 
var columns=[[

              {
        			field : 'cgje',
            		title : '采购金额',
            		width : 50,
            		formatter:function(value,row,index){
          				return row.cgje;
          			}
            		},
            		 {
              			field : 'cgl',
                  		title : '采购量',
                  		width : 50,
                  		formatter:function(value,row,index){
              				return row.cgl;
              			}
                  		},
           
          	 {
          	  field : 'mc',
          		title : '供货商',
          		width : 130,
          		formatter:function(value,row,index){
      				return row.dwGys.mc;
      			}
            },
            {
          		field : 'cid',
          		title : '采购单号',
          		width : 80
          	  ,formatter:function(value,row,index){
      				return row.yycgd.id;
      			}  
          	},
              {
            	  field : 'wssmc',
            		title : '医院名称',
            		width :  130
            		 ,formatter:function(value,row,index){
          				return row.dwWss.mc;
          			} 
              },
             
             
              { 
            	  field : 'jyjg',
          		title : '交易价格',
          		width : 50
          		 ,formatter:function(value,row,index){
      				return row.jyjg;
      			}  
          		},
          		 {
              	  field : 'zbje',
              		title : '中标价',
              		width : 50
              		  ,formatter:function(value,row,index){
            				return row.zbje;
            			}  
                },
               {
                  			field : 'sinfo',
                  			title : '采购单<br>状态', 
                  			width : 60
                  			 ,formatter:function(value,row,index){
                  				return row.sysDictInfoByCgzt.info;
                  			} 
                  		},
                
              {
            		field : 'tjsj',
            		title : '采购单提交时间',
            		width : 50,
            		formatter: function(value,row,index){
            			if(value){
            				try{
            				//通过js日期格式化
            				var date = new Date(value);
            				var y = date.getFullYear();//获取年
            				var m = date.getMonth()+1;//获取月
            				var d = date.getDate();
            				return y+"-"+m+"-"+d;
            				}catch(e){
            					alert(e);
            				}
            			}
            			
            		}
            	},
             {
            		field : 'ypxx.bm',
            		title : '流水号',
            		width : 50
            	,formatter:function(value,row,index){
          				return row.ypxx.bm;
          			}
            	},
       {
            	  field : 'tmc',
          		title : '通用名',
          		width : 50
          		 ,formatter:function(value,row,index){
      				return row.ypxx.mc;
      			} 
       },
       { 
    	   field : 'jx',
   		title : '剂型',
		width : 50
		,formatter:function(value,row,index){
				return row.ypxx.jx;
			} 
		},
       {
			field : 'gg',
    		title : '规格',
    		width : 50
    		 ,formatter:function(value,row,index){
  				return row.ypxx.gg;
  			} 
    		}
     

       

       ]];
 var toolbar=[
  
           ];
//预加载方法加载datagrid
$(function(){
	$('#yycgdlist').datagrid({
		title : '采购单列表',
		striped : true,
		url : '${baseurl}/yianalyze/checklist_result.action',//返回json
		idField : 'id',//rows中每一行唯一标识的字段
		columns : columns,
		pagination : true,
		rownumbers : true,
		toolbar : toolbar,
		loadMsg : "",
		pageList : [ 15, 30, 50, 100 ],//每页显示下拉框值
		onClickRow : function(index, field, value) {
			$('#sysuserlist').datagrid('unselectRow', index);
		}
	});
	
	
});


function yycgdquery(){
	//alert(0);
	var formdata = $("#yycgdqueryForm").serializeJson();
	//请求${baseurl}/cgd/checklist_result.action
	$('#yycgdlist').datagrid('load',formdata);
}




</script>

</head>
<body>
<!-- 查询条件 -->
<form id="yycgdqueryForm" name="yycgdqueryForm" method="post" action="">
				<TABLE  class="table_search">
				<TBODY>
					<TR>
						
						<TD class="left">通用名：</td>
						<td><INPUT type="text"  name="yybusinessQueryCustom.ypxx.mc" /></TD>
						<TD class="left">医院名称：</TD>
						<td ><INPUT type="text" name="yybusinessQueryCustom.dwWss.mc" /></td>
						<TD class="left">供应商：</TD>
						<td ><INPUT type="text" name="yybusinessQueryCustom.dwGys.mc" /></td>
						
					</TR>
					<TR>
						<TD class="left">流水号：</TD>
						<td ><INPUT type="text" name="yybusinessQueryCustom.ypxx.bm" /></td>
						<TD class="left">采购单号：</TD>
						<td ><INPUT type="text" name="yybusinessQueryCustom.yycgd.id" /></td>
						 <td class="left">采购时间：</td>
				  		<td>
				      		
								<INPUT id="yybusinessQueryCustom.startDate"
							name="yybusinessQueryCustom.startDate" 
							 onfocus="WdatePicker({isShowWeek:false,skin:'whyGreen',dateFmt:'yyyy-MM-dd'})" style="width:80px"/>
							
							至
							
								<INPUT id="yybusinessQueryCustom.startDate"
							name="yybusinessQueryCustom.startDate" 
							 onfocus="WdatePicker({isShowWeek:false,skin:'whyGreen',dateFmt:'yyyy-MM-dd'})" style="width:80px"/>
							
							
				 		 </td>
					</tr>
					<tr>
					 
						  <TD class="left"> 采购状态：</TD>
								<TD >
								<select name="yybusinessQueryCustom.sysDictInfoByCgzt.id" style="width:150px">
								<option value="">请选择</option>
								<!--groupList就是模型对象中的属性 -->
							<c:forEach items="${cgdztList}" var="dictinfo">
								  <option value="${dictinfo.id}">${dictinfo.info}</option>
								</c:forEach>
								
							</select>
								</TD>
						
						<TD class="left">采购年份(如2014)：</TD>
						<td >
						   
								<INPUT id="yybusinessQueryCustom.startDate"
							 style="width:80px"/>
							
						</td>
				 		

				  		<td colspan=2>
				  		
						<a id="btn" href="#" onclick="yycgdquery()" class="easyui-linkbutton" iconCls='icon-search'>查询</a>
				  		</td>
						
					</TR>
					
				</TBODY>
			</TABLE>
			
		</form>
<!-- datagrid -->
<TABLE border=0 cellSpacing=0 cellPadding=0 width="99%" align=center>
			<TBODY>
				<TR>
					<TD>
						<table id="yycgdlist"></table>
					</TD>
				</TR>
			</TBODY>
		</TABLE>
</body>
</html>